--- b/server/named_pipe.c
+++ a/server/named_pipe.c
@@ -1162,7 +1162,7 @@
     server->pipe_end.server_pid = get_process_id( current->process );
     init_async_queue( &server->listen_q );
 
+    list_add_head( &pipe->listeners, &server->entry );
-    list_add_tail( &pipe->listeners, &server->entry );
     if (!(server->pipe_end.fd = alloc_pseudo_fd( &pipe_server_fd_ops, &server->pipe_end.obj, options )))
     {
         release_object( server );
